package com.easylive.entity.enums;

public enum EsCountFieldEnum {
    VIDEO_PLAY (0,"playCount","视频播放数"),
    VIDEO_TIME(1,"createTime","视频时长"),
    VIDEO_DANMU(2,"danmuCount","弹幕数"),
    VIDEO_COLLECT(3,"collectCount","收藏数");


    private Integer type;
    private String fieldName;
    private String desc;

    EsCountFieldEnum(Integer type,String fieldName,String desc)
    {
    	this.type = type;
    	this.fieldName = fieldName;
    	this.desc = desc;
    }
    public static EsCountFieldEnum getEnumByType(Integer type)
    {
    	for(EsCountFieldEnum e : EsCountFieldEnum.values())
    	{
    		if(e.getType().equals(type))
    		{
    			return e;
    		}
    	}
    	return null;
    }

    public Integer getType()
    {
    	return type;
    }
    public String getFieldName()
    {
    	return fieldName;
    }
    public String getDesc()
    {
    	return desc;
    }
}
